-
Notifications
You must be signed in to change notification settings - Fork 136
Add fuzzing support. #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fuzzing support. #284
Conversation
r? @SimonSapin |
Hey Emilio. I’m sorry but I don’t have much bandwidth available for Servo and related projects these days. If you feel that |
Sure, sounds good, thanks Simon :) @BorisChiou would you be able to take a look at this? |
Should be ok. I will take a look later today |
} | ||
let token_type = token.serialization_type(); | ||
if previous_token_type.needs_separator_when_before(token_type) { | ||
serialization.push_str("/**/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec says:
If the tokenizer preserves comments, the preserved comment should be used; otherwise, an empty comment (/**/) must be inserted.
https://drafts.csswg.org/css-syntax/#serialization
So we always insert an empty comment here because we don't support preserving_comments
now. Ya, should be fine because you mentioned the browsers don't preserve coments now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this fuzzing support looks like we just parse the input and serialize it as a well-formatted string? Not sure about the use case because there is no example for now. However, the overall logic looks fine to me.
Can this land now? |
@bors-servo r=BorisChiou |
📌 Commit d2dc268 has been approved by |
☀️ Test successful - checks-travis |
No description provided.